﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Qu.ComputingContest.Model
{
    [MetadataType(typeof(RegistrationMetaData))]
    public partial class Registration
    {

        public Registration(int numStudents = 2) : base()
        {
            this.Students = new HashSet<Student>();
            for (int i = 0; i < numStudents; i++)
                this.Students.Add(new Student());
            Mentor = new Mentor();
            Mentor.School = new School();
        }

        public string Team { get; set; }

    }

    public class RegistrationMetaData
    {
        [Required]
        [DataType(DataType.Date)]
        public string WorkshopDate { get; set; }
    }
}
